<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            perspective:500px;
            transform-style: preserve-3d;
        }
        div{
            height:100px;
            width:100px;
            background-color: red;
            opacity: 0.5;
            position:absolute;
            left:0;
            top:500px;
            bottom:0;
            right:0;
            margin:auto;
        }
        .b{
            transform: translateZ(-100px);
            background-color: aqua;
        }
        .c{
            transform: rotateX(-90deg);
            background-color: blue;
            transform-origin:0px 0px;
        }
        .d{
            transform: rotateX(90deg);
            background-color: orange;
            transform-origin:0px 100px;  
        }
    </style>
</head>
<body>
    <div class="a"></div>
    <div class="b"></div>
    <div class="c"></div>
    <div class="d"></div>
    <!-- <div class="e"></div>
    <div class=""></div> -->
</body>
</html>